package decorator.main.abs;

public class AbstractBread implements IBread {

    //存储传入的Ibread对象
    private final IBread bread;

    public AbstractBread(IBread bread) {
        this.bread = bread;
    }

    @Override
    public void prepare() {
        this.bread.prepare();
    }

    @Override
    public void kneadFlour() {
        this.bread.kneadFlour();
    }

    @Override
    public void steamed() {
        this.bread.steamed();
    }

    @Override
    public void process() {
        prepare();
        kneadFlour();
        steamed();
    }
}
